<template>
  <div class="pass-rank">
    <div class="pass-table">
      <el-table
              v-loading="loading"
              element-loading-text="拼命加载中"
              element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(0, 0, 0, 0.8)"
              :data="leftData"
              style="width: 600px"
              :row-style='tableRowStyle'
              :cell-style="goalCellStyle"
              :header-cell-style="tableHeaderColor">
        <el-table-column
                prop="rank"
                label="传球"
                width="80">
        </el-table-column>
        <el-table-column
                prop="name"
                label=""
                width="150">
          <template slot-scope="scope">
            <div class="team-name">
              <img class="player-logo" :src="scope.row.teamImg" alt="">
              <span class="team-name-text myColumn" @click="enterTeam(scope.row.teamId)">{{scope.row.name}}</span>
            </div>
          </template>
        </el-table-column>
        <el-table-column
                prop="total"
                label="总计"
                width="130">
        </el-table-column>
        <el-table-column
                prop="zone"
                label="成功率(前/中/后)"
                width="240">
        </el-table-column>
      </el-table>
    </div>
    <div class="cross-table">
      <el-table
              v-loading="loading"
              element-loading-text="拼命加载中"
              element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(0, 0, 0, 0.8)"
              :data="rightData"
              style="width: 600px"
              :row-style='tableRowStyle'
              :cell-style="shootCellStyle"
              :header-cell-style="tableHeaderColor">
        <el-table-column
                prop="rank"
                label="传中"
                width="80">
        </el-table-column>
        <el-table-column
                prop="name"
                label=""
                width="150">
          <template slot-scope="scope">
            <div class="team-name">
              <img class="player-logo" :src="scope.row.teamImg" alt="">
              <span class="team-name-text myColumn" @click="enterTeam(scope.row.teamId)">{{scope.row.name}}</span>
            </div>
          </template>
        </el-table-column>
        <el-table-column
                prop="total"
                label="总计"
                width="60">
        </el-table-column>
        <el-table-column
                prop="zone"
                label="左路/右路(%)"
                width="180">
        </el-table-column>
        <el-table-column
                prop="distance"
                label="平均距离(m)"
                width="130">
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
  import teamRank from "../../../../mixin/teamRank";
  export default {
    name: "PassRank",
    mixins:[teamRank],
    data(){
      return {
       type:'organization'
      }
    },
  }
</script>

<style scoped>
  .pass-rank {
    width: 85%;
    /*height: 80%;*/
    margin: 60px auto 0;
    display: flex;
    justify-content: space-between;
    /*background-color: red;*/
  }
  .team-name {
    text-align: left;
  }
  .team-name > span {
    margin-left: 10px;
  }
  .pass-table /deep/ .el-table .cell {
    text-align: center;
    line-height: 30px;
  }
  .cross-table /deep/ .el-table .cell {
    text-align: center;
    line-height: 30px;
  }
  .team-name {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    /*margin-left: 3px;*/
    /*background-color: red;*/
  }
  .player-logo {
    width: 24px;
    height: 24px;
    margin-left: 5px;
  }
  .team-name-text {
    margin-left: 7px;
  }
</style>